<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
          name="viewport">
    <meta content="ie=edge" http-equiv="X-UA-Compatible">
    <title>0元测你的身体能量</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .img {
            font-size: 0; /* 清除内联块元素的间距 */
        }

        .img > img {
            display: inline-block;
            margin-right: -5px; /* 减小图片之间的右侧间距 */
        }

        img {
            width: 7.5rem;
        }

        .foot {
            background-color: #FFFFFF;
            position: fixed;
            bottom: 0;
            width: 7.5rem;
            height: 1.62rem;

            font-family: PingFangSC, PingFang SC;
            font-size: 0.32rem;
            color: #FF6933;
            line-height: 1.6rem;
            text-align: justify;
            font-style: normal;
        }


        .people-info {
            width: 3.98rem;
            height: 0.52rem;
            background: #FFEDE6;
            border-radius: 10px;
            border: 2px solid #FF6933;
            text-align: center;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: 0.24rem;
            color: #FF6933;
            line-height: 0.5rem;
            font-style: normal;

            position: absolute;
            top: -0.2rem;
            left: 0.2rem;
        }

        .people-info span {
            background: #FFFFFF;
            border-radius: 5px;
            padding: 0.02rem 0.1rem 0.02rem;
            box-sizing: border-box;
        }

        .btn {
            width: 2.58rem;
            height: 0.94rem;
            background: #FF6933;
            border-radius: 47px;
            float: right;


            font-family: PingFangSC, PingFang SC;
            font-size: 0.32rem;
            color: #FFFFFF;
            line-height: 0.9rem;
            font-style: normal;
            text-align: center;

            position: absolute;
            top: 0.32rem;
            right: 0.32rem;
        }
    </style>
</head>
<body>
<div class="box" style="margin-bottom: 1.45rem">
    <div class="img">
        <img src="https://zhunle.oss-cn-beijing.aliyuncs.com/active/web/images/1.png" alt="">
        <img src="https://zhunle.oss-cn-beijing.aliyuncs.com/active/web/images/2.png" alt="">
        <img src="https://zhunle.oss-cn-beijing.aliyuncs.com/active/web/images/3.png" alt="">
    </div>
    <div class="foot">
        <div style="position: relative">
            <span><span style="font-size: 0.8rem;margin-left: 0.4rem;font-weight: 500;">0</span>元测脉轮</span>
            <div class="people-info">每日<span>{$total}</span>个名额，今日仅剩<span>{$residue}</span>人</div>
            <div class="btn">立即开始测试</div>
        </div>
    </div>
</div>
</body>
<script src="{$oss}active/seven/js/jquery-v2.1.1.min.js"></script>
<script src="{$oss}/active/newyear/js/rem.js"></script>
<script>
    let header = {$header}

    /**
     * 调用客户端本地跳转
     * @param target
     * @param link
     */
    function commonJsToNative(target, link) {
        if (!target) return;
        console.log('commonJsToNative', 'target:', target, 'link:', link, 'app-type:', header['app-type']);
        switch (header['app-type']) {
            case 'ios':
                window.webkit.messageHandlers.commonJsToNative.postMessage({
                    'target': target,
                    'link': link,
                });
                break;
            case 'android':
                androidwebview.commonJsToNative(target, link)
                break;
            default:
                if (target === 'link') {
                    window.location.href = link;
                } else {
                    console.log('跳转不支持', 'target:', target, 'link:', link);
                }
        }
    }

    $(document).on("click", ".btn", function () {
        console.log(header)
        // commonJsToNative('local', 'jump_mobile_browser?link=https%3A%2F%2Fwork.weixin.qq.com%2Fca%2Fcawcdef78ab063ba83&need_auth=0')
        commonJsToNative('local', 'jump_mobile_browser?link=https%3A%2F%2Fwork.weixin.qq.com%2Fca%2Fcawcde742f15a830f9&need_auth=0')
    })
</script>
</html>
